
local modname = "naturalbiomes"
local modpath = minetest.get_modpath(modname)
local mg_name = minetest.get_mapgen_setting("mg_name")

-- Load support for intllib.
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"

local S = minetest.get_translator and minetest.get_translator("naturalbiomes") or
		dofile(path .. "intllib.lua")

naturalbiomes = naturalbiomes or {}

function naturalbiomes.make_register_node(suffix)
	local register_node = minetest.register_node
	if minetest.get_modpath("moreblocks") then
		local old_register = register_node
		register_node = function(name, ...)
			old_register(name, ...)
			local nname = string.match(name, ".+:(.+)")
			assert(nname)
			stairsplus:register_all(modname, nname, name, ...)

			if suffix then
				assert(type(suffix) == "string")
				local name = modname .. "_" .. suffix

				minetest.register_alias_force("stairs:stair_" .. name, modname .. ":stair_" .. nname)
				minetest.register_alias_force("stairs:stair_outer_" .. name, modname .. ":stair_" .. nname .. "_outer")
				minetest.register_alias_force("stairs:stair_inner_" .. name, modname .. ":stair_" .. nname .. "_inner")
				minetest.register_alias_force("stairs:slab_"  .. name, modname .. ":slab_"  .. nname)
			end
		end
	end

	return register_node
end


-- biomes

dofile(path .. "wetsavanna.lua") --
dofile(path .. "alderswamp.lua") --
dofile(path .. "alpine.lua") --
dofile(path .. "bambooforest.lua") --
dofile(path .. "palmbeach.lua") --
dofile(path .. "outback.lua") --
dofile(path .. "mediterranean.lua") --
dofile(path .. "crafting.lua") --
dofile(path .. "hunger.lua") --

naturalbiomes.make_register_node = nil